<?php
$page_type = "A";
require_once 'header.php';

$client_id = $_POST["client_id"];

$sql = "delete from CLIENT where Client_ID='$client_id'";

$result_array = execute_sql_in_oracle($sql);
$result = $result_array["flag"];
$cursor = $result_array["cursor"];

if (!$result){
  $delete_error = 'Client ID('."<b><font color=\"black\">".$client_id."</font></b>".') deletion failed!';
  header("Location:client.php?delete_error=$delete_error");
}
else {
  // Record deleted, redirect to client.php
  $delete_success = 'Client ID('."<b><font color=\"black\">".$client_id."</font></b>".') deleted successfully!';
  header("Location:client.php?delete_success=$delete_success");
}
?>